package com.lzx.applib.gson;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonSyntaxException;
import com.lzx.applib.gson.BooleanTypeAdapter;
import com.lzx.applib.gson.ListTypeAdapter;

import java.util.List;

/**
 * Created by Administrator on 16/11/16.
 */

public class GsonUtil {

    private GsonUtil() {
    }

    private static Gson gson = new GsonBuilder()
            .registerTypeAdapter(Boolean.TYPE, new BooleanTypeAdapter())
            .registerTypeHierarchyAdapter(List.class, new ListTypeAdapter())
            .create();

    public static Gson getInstance() {
        return gson;
    }
}
